﻿using System;

namespace Slippor.Common.PluginFramework
{
    public class AuthorAttribute : Attribute
    {
        public PluginAuthor Author
        {
            get;
            private set;
        }

        public AuthorAttribute(String name)
        {
            Author = new PluginAuthor(name, String.Empty);
        }

        public AuthorAttribute(String name, String url)
        {
            Author = new PluginAuthor(name, url);
        }
    }

    public class PluginAuthor
    {
        public PluginAuthor(String name, String url)
        {
            _authorName = name;
            _authorUrl = url;
        }

        private readonly String _authorName = String.Empty;
        private readonly String _authorUrl = String.Empty;

        public string AuthorName
        {
            get { return _authorName; }
        }

        public string AuthorUrl
        {
            get { return _authorUrl; }
        }
    }
}